fix(toast): keep other overlays open when a toast appears (#DS-5407) - #1909
Open
lskramarov wants to merge 3 commits into
Open
fix(toast): keep other overlays open when a toast appears (#DS-5407)#1909lskramarov wants to merge 3 commits into
lskramarov wants to merge 3 commits into
Conversation
The toast container is a registered CdkScrollable and faked a scroll event on every toast animation callback. ScrollDispatcher is application-wide, so that closed every overlay using a close-on-scroll strategy — tooltips, selects and dropdowns inside a tab, popovers with closeOnScroll, and third-party overlays sharing the Angular instance. The automatic dispatch is gone. dispatchScrollEvent() stays public but deprecated: it is now the opt-in for repositioning an overlay anchored inside a toast when the stack shifts.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the toast overlay behavior so that showing/animating a toast no longer triggers global scroll notifications that would inadvertently close other overlays (e.g., tooltips/popovers using close-on-scroll strategies).
Changes:
- Remove the toast container’s automatic “fake scroll” dispatch on toast animation events to avoid notifying the global
ScrollDispatcher. - Mark
KbqToastContainerComponent.dispatchScrollEventas deprecated and keep it available only for explicit callers. - Add regression tests and a dev-example scenario to verify that other overlays remain open when a toast appears.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tools/public_api_guard/components/toast.api.md | Updates API snapshot to reflect deprecation and constructor signature changes. |
| packages/components/toast/toast.spec.ts | Adds coverage ensuring toasts don’t trigger global scroll notifications that close unrelated overlays. |
| packages/components/toast/toast-container.component.ts | Stops auto-dispatching scroll on toast animation; documents/deprecates the legacy scroll-dispatch callback. |
| packages/components-dev/toast/template.html | Adds a manual repro block (tooltip/popover + toast) for DS-5407 validation. |
| packages/components-dev/toast/module.ts | Imports tooltip/popover modules needed by the new dev template scenario. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
Visit the preview URL for this PR (updated for commit e5899f9): https://koobiq-next--prs-1909-4anf77am.web.app (expires Thu, 20 Aug 2026 18:41:52 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: c9e37e518febda70d0317d07e8ceb35ac43c534c |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.